<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ASIMS</title>
<link href="../CSS/style.css" rel="stylesheet" type="text/css" />
</head>

<script type="text/javascript">
function deleteFacility(){
	tableList.action="deleteFacility.action";
	tableList.submit();
}

function updateFacility(){
	tableList.action="queryFacilityById.action";
	tableList.submit();
}
</script>

<body>
	<div id="wrap">
		<div id="header">
			<h1 id="sitename"><a href="#">ASIMS</a></h1>
				<div id="nav">
					<div id="titleblock">
						<div id="subject">机场静态信息管理系统</div>
						<div id="spirit"><a href="#"><%= session.getAttribute("username") %> 已登录</a> | <a href="queryUserForIndex.action" target="_parent">个人信息维护</a> | <a href="../login/login.jsp" target="_parent">注销</a></div>
					</div>
					<div id="topmenu">
						<ul>
							<li><a href="../login/index.jsp">首页</a></li>
							<li><a href="../rolemanage/user_manag.jsp">用户和角色管理</a></li>
							<li><a href="../airline_manage/airline_manag_InAr.jsp">航班信息管理</a></li>
							<li class="active"><a href="../facilities_manag/facilities_manag.jsp">机场设施管理</a></li>
							<li><a href="../news/news_view_intr.jsp">新闻中心</a></li>
						</ul>
					</div>
				</div>
			<div class="clear"></div>
			<div id="breadcrumb">网站路径：<a href="../login/index.jsp">首页</a> &raquo; <a href="#"  class="active">机场设施管理</a></div>
		</div>
		
		<div id="content">
			<div id="right">
			   <div class="post">
					<h2><a href="">机场资源</a></h2>
						<form action="queryFacility.action" method="post" enctype="multipart/form-data">
							<div class="contactform">
								<p class="first">
									<label for="resourcename">资源名称：</label>
									<s:textfield name="facility.resourcename"></s:textfield>
								</p>
								<div class="buttons">
									<div class="butarea1"></div>
										<button type="submit" class="button2" name="save">
											<img src="../images/find.png" alt=""/> 
											查询
										</button>
								</div>
							</div>
						</form>
						<form name="tableList" method="post" enctype="multipart/form-data">
						<table cellspacing="0" cellpadding="0">
						  <thead>
								<tr>
								  <th scope="col"></th>
								  <th scope="col">序号</th>
								  <th scope="col">资源名称</th>
								  <th scope="col">数量</th>
								  <th scope="col">位置</th>
								  <th scope="col">备注</th>
								</tr>
						  </thead>
						  <tbody>
							<s:iterator value="#request.facilityList" id="facilityList" status="st">
								<tr>
								  <td><s:radio name="checkedFacilityId" list="{#facilityList.facilityId}" theme="simple" value="1" cssStyle="width:12.5%"/></td>
								  <td><s:property value="#facilityList.facilityId" /></td>
								  <td><s:property value="#facilityList.resourcename" /></td>
								  <td><s:property value="#facilityList.number" /></td>
								  <td><s:property value="#facilityList.place" /></td>
								  <td><s:property value="#facilityList.remark" /></td>
								</tr>
							</s:iterator>
						  </tbody>  
						</table>
						</form>
			</div>
			
			<div class="pagenavi">
				<span class="alignright"><a href="#">下一页</a> &raquo;</span>
				<span class="alignleft">&laquo; <a href="#">上一页</a></span>
			</div>
				<div class="buttons">
					<div class="butarea3"></div>
						<button type="submit" name="add" onClick="javascript:window.location.href='../facilities_manag/facilities_manag_add.jsp'">
							<img src="../images/add1-16.png" alt=""/> 
							新增
						</button>
						<button type="submit" name="del" onClick="deleteFacility()">
							<img src="../images/cross.png" alt=""/> 
							删除
						</button>
						<button type="submit" name="revise" onClick="updateFacility()">
							<img src="../images/textfield_key.png" alt=""/> 
							修改
						</button>
				</div>
			</div>

			<div id="sidebar">
				<div id="sidebartop"></div>
					<h2>机场设施管理</h2>
						<ul>
						  <li class="active"><a href="queryFacilityAuto.action">机场资源</a></li>
						  <li><a href="queryResourceAuto.action">物业设施</a></li>
						</ul>
			</div>
			<div class="clear"></div>
			<div id="bottom">
				<p><img src="../images/copyright.jpg" /></p>
				<p><a href="">隐私权</a> | <a href="">&copy;版权</a> | <a href="">法律声明</a> | <a href="">电子邮件：admin@163.com</a>
			</div>
		</div>
	
		<div id="footer">
			<div id="credits">
				ASIMS Power by IBM
			</div>
		</div>
	</div>

</body>
</html>

